<!--添加禁止IP-->
<include file="public:header" />
<style>
	table td,th{
		font-size:14px;
		padding:5px;
	}
	h2{font-size:16px;color:#aaa;padding:10px 0;}

</style>
<div class="dialog_content" style="width:960px; float:left; padding:20px;padding-bottom:50px;">
	<h2>优惠券返现规则</h2>
	<form id="info_form" name="info_form" action="" method="post">
	<table>
		<if condition="$data">
		<volist name="data" id="vo">
		<tr>
			<th> * </th>
			<td>满 <input name="need_price[]" type="text" size="5" value="{$vo.need_price}">元 </td>
			<td>返 <input name="back_price[]" type="text" size="5" value="{$vo.back_price}">元</td>
		</tr>
		</volist>
		<else/>
		<tr>
			<th> * </th>
			<td>满 <input name="need_price[]" type="text" size="5"><span class="red">元</span></td>
			<td>返 <input name="back_price[]" type="text" size="5"><span class="red">元</span></td>
		</tr>
		</if>
		<tr>
			<td colspan=3 align="right">
				<input type="button" id='addrule_btn' value="添加规则">
			</td>
		</tr>
		<tr>
			<td align="right" style="padding-top:50px" colspan=3><input type="submit" value="{:L('submit')}" class="btn btn_submit"></td>
		</tr>
	</table>
	</form>
</div>
<include file="public:footer" />
<script>
$("#addrule_btn").click(function(){
	var html = $(this).parent().parent().prev().html()
	$("table").prepend("<tr>" + html + "</tr>")
})
</script>
